package com.liu.dao.user;

import com.liu.pojo.Role;
import com.liu.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserDao {

    //得到登录的用户
    public User getLoginUser(Connection connection, String userCode, String userPassword) throws SQLException;

    //根据用户编号获取用户信息
    public int updatePwd(Connection connection, int id, String password) throws SQLException;

    //查询用户数量
    public int getUserCount(Connection connection,String userName,int userRole) throws SQLException;

    //通过条件查询-user-list
    public List<User> getUserList(Connection connection, String userName, int userRole, int currentPageNo, int pageSize) throws SQLException;

    //获取角色列表
    public List<Role> getRoleList(Connection connection) throws SQLException;
}
